//
//  WZComInfoFram.m
//  ETong
//
//  Created by wanzhao on 15/10/30.
//  Copyright (c) 2015年 wanzhao. All rights reserved.
//

#import "WZComInfoFram.h"

@implementation WZComInfoFram

- (void)setComInfo:(WZCompanyInfo *)comInfo
{
    _comInfo = comInfo;
    CGSize AddressSize = [comInfo.companyAddress sizeWithFont:Font15 maxSize:CGSizeMake(HARDWARE_SCREEN_WIDTH - OppositeWidthRate(60), MAXFLOAT)];
    _nameFrame = CGRectMake(OppositeWidthRate(10), OppositeHeightRate(10), HARDWARE_SCREEN_WIDTH - OppositeWidthRate(20), AddressSize.height);
    _addFrame = CGRectMake(OppositeWidthRate(40), CGRectGetMaxY(_nameFrame) + OppositeHeightRate(20), AddressSize.width, AddressSize.height);
    _telFrame = CGRectMake(OppositeWidthRate(40), CGRectGetMaxY(_addFrame) + OppositeHeightRate(20), HARDWARE_SCREEN_WIDTH - OppositeWidthRate(60), AddressSize.height);
    _faxFrame = CGRectMake(OppositeWidthRate(40), CGRectGetMaxY(_telFrame) + OppositeHeightRate(10), HARDWARE_SCREEN_WIDTH - OppositeWidthRate(60), AddressSize.height);
    
    _line1Frame = CGRectMake(0, CGRectGetMaxY(_faxFrame), HARDWARE_SCREEN_WIDTH, OppositeHeightRate(1) / 2.0);
    _line2Frame = CGRectMake(0, CGRectGetMaxY(_line1Frame), HARDWARE_SCREEN_WIDTH, OppositeHeightRate(1) / 2.0);
    
    _cellHeight = CGRectGetMaxY(_line2Frame) + OppositeHeightRate(10);
}

@end
